package com.sohu.peak.gallery.service;

import com.sohu.peak.util.Logger;
import com.sohu.peak.util.SendNewshooUtil;

public class NewshooThread {
	
	private static class Notify extends Thread {
		private static final Logger log = new Logger();
		private String insertGroupStr;
		private String firstPicUrl;
		private String picname;
		
		public Notify(String insertGroupStr,String firstPicUrl,String picname){
			this.insertGroupStr = insertGroupStr;
			this.firstPicUrl = firstPicUrl;
			this.picname = picname;
		}		
		public void run(){
			log.debug("insertGroupStr=%s,firstPicUrl=%s,picname=%s",insertGroupStr, firstPicUrl, picname);
			if(SendNewshooUtil.sendNewshoo(insertGroupStr, firstPicUrl, picname)){
				log.info("Send newshoo success.");
			}else{
				log.info("Send newshoo fail.");
			}
		}
	}

	public static Thread getThread(String insertGroupStr,String firstPicUrl,String picname){
		return new Notify(insertGroupStr,firstPicUrl,picname);
	}
	
}
